﻿Imports System.ComponentModel
Imports System.Net
Imports System.Threading
Imports Sy.UI
Imports Sy.UI.Cef
Imports Zombie_Products

Public Class Frm_Capture
    Friend Shared ReadOnly Instance As Frm_Capture = Frm_Capture
    'Private WithEvents CefWeb As CefBrowser
    Private Sub Capture_Load(sender As Object, e As EventArgs) Handles Me.Load
        CefWeb2 = CefBrowser.LoadBrowser(Pnl_Web, url)
    End Sub
    Private url As String

    Friend Overloads Function ShowDialog(parent As Form1, url As String) As String
        Me.url = url
        Me.ShowDialog(parent)
        Return CefWeb2.GetDomHtml()
    End Function

    Private Sub Frm_Capture_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
        e.Cancel = True
        Hide()
        Console.WriteLine(CefWeb2.GetDomHtml())
    End Sub
End Class